package com.cn.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.cn.dao.BookDao;
import com.cn.domain.Book;

@Transactional
public class BookService {
	//注入BookDao
	private BookDao bookDao;

	public void setBookDao(BookDao bookDao) {
		this.bookDao = bookDao;
	}

	public List<Book> findAllBook() {
	
		return bookDao.findAllBook();
	}

	public Book getBookId(int bid) {
		
		return bookDao.getBookId(bid);
	}

	public void deleteBook(Book book) {
		
		bookDao.deleteBook(book);
		
	}

	public void saveBook(Book model) {
		
		bookDao.saveBook(model);
	}

	public void updateBook(Book book) {
		
		bookDao.updateBook(book);
		
	}


	

}
